//
//  SAPAboutCarViewController.m
//  CarsHome
//
//  Created by dapeng on 15/12/11.
//  Copyright © 2015年 dapeng. All rights reserved.
//

#import "SAPAboutCarViewController.h"
#import "SAPFunctionViewController.h"
@interface SAPAboutCarViewController ()
@end

@implementation SAPAboutCarViewController
- (void)dealloc {
    [super dealloc];
}
- (void)viewDidLoad {
    [super viewDidLoad];
    self.navigationItem.title = @"关于";
//    self.view.backgroundColor = [UIColor colorWithCGColor:];
    UIView *whiteBackground = [[UIView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_SIZE.width, SCREEN_SIZE.height/2)];
    whiteBackground.backgroundColor = [UIColor whiteColor];
    
    UIImageView *carsIco = [[UIImageView alloc] initWithFrame:CGRectMake((SCREEN_SIZE.width - SCREEN_SIZE.width/4)/2, 150, SCREEN_SIZE.width/4, SCREEN_SIZE.width/4)];
    carsIco.image = [UIImage imageNamed:@"qichebangpai"];
    carsIco.layer.cornerRadius = SCREEN_SIZE.width/4/4;
    
    UILabel *edition = [[UILabel alloc] initWithFrame:CGRectMake((SCREEN_SIZE.width - SCREEN_SIZE.width/4)/2, 170 + SCREEN_SIZE.width/4, SCREEN_SIZE.width/4, 20)];
    edition.text = @"版本 1.0.5";
    edition.textAlignment = NSTextAlignmentCenter;
    edition.alpha = 0.8;
    edition.font = [UIFont systemFontOfSize:12];
    
    UILabel *copyright = [[UILabel alloc] initWithFrame:CGRectMake((SCREEN_SIZE.width - SCREEN_SIZE.width/4 - 50)/2, 190 + SCREEN_SIZE.width/4, SCREEN_SIZE.width/4 + 50, 20)];
    copyright.text = @"汽车帮派 版本所有";
    copyright.textAlignment = NSTextAlignmentCenter;
    copyright.alpha = 0.8;
    copyright.font = [UIFont systemFontOfSize:12];
    
    [whiteBackground addSubview:carsIco];
    [whiteBackground addSubview:edition];
    [whiteBackground addSubview:copyright];
    [self.view addSubview:whiteBackground];
    [carsIco release];
    [edition release];
    [copyright release];
    
    UILabel *function = [[UILabel alloc] initWithFrame:CGRectMake(0, SCREEN_SIZE.height/2 + 50, SCREEN_SIZE.width, 50)];
    function.text = @"    功能介绍";
    function.backgroundColor = [UIColor whiteColor];
    function.userInteractionEnabled = YES;
    
    
    UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapAction:)];
    [function addGestureRecognizer:tap];
    [self.view addSubview:function];
    


}
- (void)tapAction:(UITapGestureRecognizer *)tap {
    SAPFunctionViewController *functionVC = [[SAPFunctionViewController alloc] init];
    [self.navigationController pushViewController:functionVC animated:YES];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
